package com.eurasia.assignment.infrastructure.repository;

import java.util.Optional;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import com.eurasia.assignment.infrastructure.entity.ProjectAssignmentEntity;

/**
 * 项目分配仓储接口
 */
@Repository
public interface ProjectAssignmentRepository extends JpaRepository<ProjectAssignmentEntity, Long> {
    
    /**
     * 根据项目ID查询项目分配
     * @param projectId 项目ID
     * @return 项目分配
     */
    Optional<ProjectAssignmentEntity> findByProjectId(Long projectId);
    
    /**
     * 根据项目ID删除项目分配
     * @param projectId 项目ID
     */
    void deleteByProjectId(Long projectId);
} 